package com.studio701.carguard.service.imp;

import com.studio701.carguard.pojo.UserContact;
import com.studio701.carguard.mapper.UserContactMapper;
import com.studio701.carguard.service.IUserContactService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author xjc
 * @since 2022-03-28
 */
@Service
public class UserContactServiceImpl extends ServiceImpl<UserContactMapper, UserContact> implements IUserContactService {

    @Autowired
    UserContactMapper userContactMapper;

    @Override
    public boolean updateContactByUserId(UserContact userContact) {
        return userContactMapper.updateContactByUserId(userContact);
    }

    @Override
    public boolean removeByUserId(Integer id) {
        return userContactMapper.removeByUserId(id);
    }

    @Override
    public List<UserContact> getAllContactByUserId(Integer id) {
        return userContactMapper.getAllContactByUserId(id);
    }
}
